package com.code.time1124;

public class StringBuilderTest {

	public static void main(String[] args) {
		StringBuilder sb = new StringBuilder("abc");
		sb.append("def");
//		sb.delete(1, 5);
//		sb.deleteCharAt(1);
		sb.insert(0,true).insert(0,"狼牙棒");
		sb.reverse();
//		sb.setCharAt(1, 'a');
		System.out.println(sb);
		System.out.println(sb.length());
//		sb.setLength(200);
		System.out.println(sb.length());
		StringBuilder sb2 = new StringBuilder("qwre");
		int capacity = sb2.capacity();
		System.out.println(capacity);
		sb2.trimToSize();
		System.out.println(sb2.capacity());
		System.out.println(sb2.length());
	}

}
